﻿@model BrnMall.Web.MallAdmin.models.WeiXinMenuModel[]
@section body{
	@using (Html.BeginForm())
	{
		<h1 class="rightH1">
			微信管理 &gt;&gt; 接入设置
			<div class="clear">
			</div>
		</h1>
		<table>
			<thead>
				<tr>
					<th></th>
					<th>名称</th>
					<th>Url</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				@{ var index = -1;}
				@foreach (var item in Model)
				{
					<tr>
						<td>@Html.Hidden("[@++index].Id", item.Id)<strong>一级菜单</strong></td>
						<td>@Html.TextBox("[@index].Name", item.Name)</td>
						<td>@Html.TextBox("[@index].Url", item.Url)</td>
						<td><button>删除</button></td>
					</tr>
					@foreach (var child in item.Children)
					{
						<tr>
							<td>@Html.Hidden("[@++index].Id", child.Id)@Html.Hidden("[@index].ParentId", child.ParentId)<strong>二级菜单</strong></td>
							<td>@Html.TextBox("[@index].Name", item.Name)</td>
							<td>@Html.TextBox("[@index].Url", item.Url)</td>
						</tr>
					}
				}
				<tr>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
				</tr>
			</tbody>
		</table>
	}
}